<template>
  <div class="details">
    <div class="wrapper">
      <h2 class="name">{{ data.title }}</h2>
      <span style="font-size: 18px">{{data.content}}</span>
    </div>


  </div>
</template>

<script>
    import { getInfoDetail } from "@/utils/request";
    export default {
        name: "About",
        data() {
            return {
                title: "",
                data: {},
            };
        },
        methods: {
            // 查询项目的详细信息
            findDetails() {
                // 数据交互
                getInfoDetail(this.title).then((res) => {
                    if (res.code == 200) {
                        this.data = res.data;
                    } else {
                        this.$message({
                            type: "error",
                            message: res.msg,
                        });
                    }
                });
            },
        },
        created() {
            // 在页面加载的时候拿到数据
            // 拿到从上一个页面传过来的id值
            this.title = "关于我们";
            this.findDetails();
        },
    };
</script>

<style scoped lang='scss'>
  .details {
    .wrapper{

      .name {
        text-align: center;
        font-size: 30px;
        color: #0189ec;
      }
      .img{
        width: 1300px;
        height: 500px;
      }
      .oth {
        /*text-align: center;*/
        font-size: 30px;
      }
      .con {
        font-size: 18px;
      }
    }
  }
</style>
